<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
p{
    font-size: 16px;font-weight: bolder;
    text-decoration: none;
    text-decoration: underline;
}
div{
    font-size: 3em;
    border: 1px solid red;
    text-indent: 12%;
    width: 100%;
}
    </style>
</head>
<body>
    <p>通过px设置段落文字字号</p>
    <div>通过em设置文字字号</div>
</body>
</html>